package br.ucb.musicbay.util;

import br.ucb.musicbay.album.AlbumDao;
import br.ucb.musicbay.artista.ArtistaDao;
import br.ucb.musicbay.genero.GeneroDao;
import br.ucb.musicbay.musica.MusicaDao;
import br.ucb.musicbay.musica.MusicaInterfaceDao;
import br.ucb.musicbay.usuario.UsuarioDao;

public class DAOFactory {
	public static UsuarioDao createUserDao() {
		UsuarioDao userHibernate = new UsuarioDao();
		userHibernate.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return userHibernate;
	}

	public static ArtistaDao createArtistaDao() {
		ArtistaDao artistaHibernate = new ArtistaDao();
		artistaHibernate.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return artistaHibernate;
	}

	public static GeneroDao createGeneroDao() {
		GeneroDao generoHibernate = new GeneroDao();
		generoHibernate.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return generoHibernate;
	}

	public static AlbumDao createAlbumDao() {
		AlbumDao albumHibernate = new AlbumDao();
		albumHibernate.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return albumHibernate;
	}

	public static MusicaInterfaceDao createMusicaDao() {
		MusicaDao musicaHibernate = new MusicaDao();
		musicaHibernate.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return musicaHibernate;
	}
}
